﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcEngine.Core.Registry
{
    public abstract class ActionFilterRecordBase
    {
        protected List<IFilterCriteria> criteria;

        public ActionFilterRecordBase()
        {
        }

        public bool Match(ActionFilterRegistryContext context)
        {
            return criteria.Aggregate(true, (prev, f) => prev ? f.Match(context) : prev);
        }
    }
}
